package tt.lab.pmbok.dao;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import tt.lab.pmbok.model.Tool;

public class ToolDaoHibernate  implements ToolDao {
	@Resource(name = "sessionFactory")
	private SessionFactory sessionFactory;
	

	private Session getSession(){
		return sessionFactory.getCurrentSession();
	}
	
	public Tool load(int id) {
		return (Tool) getSession().load(Tool.class, id);
	}


}
